function [output, overlap] = phaseShiftTransform(overlap, in, tf_factor)
	overlapLen = length(overlap);
	inLen = length(in);
	len = inLen + overlapLen;
	if(modulo(len, 2) ~= 0)
		error("Incorrect parameter in phaseShfitTransform: length of overlap plus in must be even");
	end
	xn = [overlap(:); in(:)];
	xk = fft( xn);
	xk_trans = [xk(1:len/2)*(tf_factor); xk(len/2+1 : len)*conj(tf_factor)];
	xn_trans = ifft(xk_trans);
	output = real(xn_trans);
	output = output(overlapLen + 1: len)
	overlap = xn(len-overlapLen+1:len);
endfunction
